package com.datatraffic.salesup;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.widget.Toast;

public class PopupAvisoLegal extends DialogFragment{

	static PopupAvisoLegal newInstance(String title){
		PopupAvisoLegal fragment = new PopupAvisoLegal();
		Bundle args = new Bundle();
		
		fragment.setArguments(args);
		return fragment;
	}

	public Dialog onCreateDialog(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		String title = getArguments().getString("title");
		return new AlertDialog.Builder(getActivity())
		.setIcon(R.drawable.ic_launcher)
		
		.setPositiveButton("Aceptar", new DialogInterface.OnClickListener() {

			@Override
			public void onClick(DialogInterface dialog, int which) {
				// TODO Auto-generated method stub
				Toast.makeText(getActivity(), "Funcionando", Toast.LENGTH_SHORT).show();
			}
		})	            
		.create();	    
	}
}
